Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F3/thermal #179

Merged
merged 39 commits into from
Jan 8, 2025
Merged

F3/thermal #179

merged 39 commits into from
Jan 8, 2025

Conversation

calbaker
Copy link
Collaborator

@calbaker calbaker commented Jan 6, 2025

No description provided.

calbaker and others added 30 commits December 26, 2024 10:00
so that we can easily generate correctly formatted serialized versions
added vehicles for thermal calibration
various other changes
`from_msg_pack` is complaining about getting a string:
`OSError: invalid type: string "\"[]\"", expected a sequence`
running `python/fastsim/demos/demo_hev.py` and then
```python
import msgpack
fsim.SimDrive.from_msg_pack(msgpack.packb(msgpack.loads(sd.to_msg_pack())))
```
which yields:
```

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[8], line 1
----> 1 fsim.SimDrive.from_msg_pack(msgpack.packb(msgpack.loads(sd.to_msg_pack())))

OSError: invalid type: string "\"[]\"", expected a sequence
```
shows that message pack is 2.5 orders of magnitude faster than yaml!
…ipt/test mode but is hit or miss interactive mode
Evidence that yaml and msg_pack produce darn near the same result on
linux machine:
```
in [4]: import deepdiff

in [5]: deepdiff.deepdiff?

in [6]: deepdiff.deepdiff(sd_dict_msg, sd_dict_yaml)
out[6]:
{'type_changes': {"root['sim_params.ach_speed_tol']": {'old_type': float,
   'new_type': str,
   'old_value': 1e-09,
   'new_value': '1e-9'}}}

in [7]: sd_dict_msg['veh.chassis.wheel_base_meters'] == sd_dict_yaml['veh.chassis.wheel_base_meters']
out[7]: true

in [8]: sd_dict_msg['veh.chassis.wheel_base_meters']
out[8]: 2.7
```
only the one thing changed, and it's not problematic
@calbaker calbaker merged commit e3729f7 into fastsim-3 Jan 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant